package my.design.principle;

/**
 * @author zp
 * @version 1.0
 * @description: 行为原则第一条 单一原则
 * 使用方法 执行的方式
 * @date 2022/9/26 18:51
 */
public class SingleResponsibility3 {
    public static void main(String[] args) {
        Vehicle2 vehicle = new Vehicle2();
        vehicle.roadRun("汽车");
    }
}

class Vehicle2 {
    public void roadRun(String vehicle){
        System.out.println(vehicle+"在马路上运行");
    }

    public void airRun(String vehicle){
        System.out.println(vehicle+"在天上上运行");
    }
}
